class: center, middle, inverse, title-slide # R Basics ### Fernando Henrique Correr ### Lachowiec Lab - Montana State University ### 2022/10/19 --- # History .pull-left-III[ [Department of Genetics](http://www.genetica.esalq.usp.br/en/) - [ESALQ](http://www.en.esalq.usp.br) ([USP](https://www5.usp.br)) * Course taught for more than 10 times * Extension groups - [GVENCK](https://gvenck.github.io/) and [GENt](https://gent-esalq.github.io/) Teach [introductory programming](https://doi.org/10.1371/journal.pcbi.1009534) skills! **Thank you!!!** ] .pull-right-III[ .center[] ] --- ## Why R? <img src="data:image/png;base64,#202210_RBasics_files/figure-html/unnamed-chunk-1-1.png" style="display: block; margin: auto;" /> ??? You all know better than me! --- # What is R? .pull-left[ Software environment for statistical computing and graphics * Language and environment * GNU project * Similar to the S language * John Chambers and colleagues - Bell Laboratories ] -- .pull-right[ Can be used in any platform Uses: * Data manipulation * Fast processing (C, C++ and Fortran) * Big Data * Automation and reproducibility * Reports and Presentations * Graphs! ] ??? similar to the S language and environment which was developed at Bell Laboratories (telephone, fax, transistors, LEDs, C, Unix) --- <iframe src="https://r-graph-gallery.com/img/graph/271-ggplot2-animated-gif-chart-with-gganimate2.gif" width="100%" height="600px" data-external="1"></iframe> --- <iframe src="https://r-graph-gallery.com/HtmlWidget/sankeyEnergy.html" width="100%" height="600px" data-external="1"></iframe> --- ## GNU Fres software Foundation's GNU general license Can run a software for any purpose Distribute copies! Study how the software works and make changes * Improve and share! Power to the user!!! --- # Programming -- Why??? -- .center[ <iframe width="700" height="300" src="https://www.youtube.com/embed/xfBWk4nw440" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>] -- Repetitive work -- New jobs in the near future! --- ## Reproducibility [A manifesto for reproducible science](https://www.nature.com/articles/s41562-016-0021) [Run your code after 10 years!!!](https://www.nature.com/articles/d41586-019-03296-8) --- # How to programm? .center[] .footnote-right[[The Bumpy Learning Curve](http://sascha-kasper.com/the-bumpy-learning-curve/)] --- .pull-left[ [](https://www.pinterest.com/pin/17732992256412855/) ] -- .pull-right[ [](https://www.pixelstech.net/fun/581-New-programmer-vs-Experienced-programmer) ] --- # This training -- Practice! -- Be creative! -- Have patience to develop your logic -- Bugs (Grace Hopper - 1947) * Identify the line * Scientific method: hypotheses and tests * Google! -- **Practice!!!** ??? No final, vocês ainda devem praticar --- .pull-left[ ### Acknowledgments #### Supervisor Prof. Dr. Jennifer Lachowiec #### Collaborators Everet Owen Dr. Cristiane Taniguti Dr. Guilherme Hosaka ] .pull-right[ ### Infrastructure .center[ ] ### Funding .center[  ] ### Contact us  .footnote-right[ fernando.correr@montana.edu ] ]